<template>
    <section>
        <table class="t">
            <thead>
                <tr>
                    <th>部位
                    </th>
                    <th :key='sizeId' v-for="(sizeId,index) in sizeIdArray">
                        <el-tooltip class="item" effect="dark" content="选为基础码?" placement="top-start">
                            <el-button v-if="showTh" class='btn_size' @click='selDefaultSize(sizeId)' type="text">{{getSizeName(sizeId)}} <i :key='sizeId' v-show="sizeId==currObj.defaultSizeId" class='el-icon-star-on'></i></el-button>
                        </el-tooltip>
                    </th>
                    <th>量法
                    </th>
                    <th>误差
                    </th>
                    <th>裆差
                    </th>
                    <th>操作
                    </th>
                </tr>
            </thead>
            <tbody>
                <tr v-for="(item,index) in currObj.detail">
                    <td>
                        <el-input size="small" placeholder="请输入内容" v-model="item.part">
                        </el-input>
                    </td>
                    <td :key='sizeId' v-for="(sizeId,index) in sizeIdArray" :label="getSizeName(sizeId)">
                        <template>
                            <el-input size="small" placeholder="请输入内容" v-model="item[sizeId]">
                            </el-input>
                        </template>

                    </td>
                    <td>
                        <template>
                            <el-input size="small" placeholder="请输入内容" v-model="item.method">
                            </el-input>
                        </template>
                    </td>
                    <td>
                        <template>
                            <el-input size="small" placeholder="请输入内容" v-model="item.errorRange">
                            </el-input>
                        </template>
                    </td>
                    <td>
                        <template>
                            <el-input size="small" placeholder="请输入内容" v-model="item.dangRange">
                            </el-input>
                        </template>
                    </td>
                    <td>
                        <template>
                            <el-button size="small" @click="delDetal(item, currObj.detail)">删除</el-button>
                        </template>
                    </td>
                </tr>
            </tbody>
        </table>



        <el-button @click.prevent="addDetail()"> 新增一行</el-button>
    </section>
</template>
<script src="./t300.js"></script>
<style>
    .btn_size {
        min-width: 50px
    }
</style>